<?php
if (!defined('APP_ID')) { die('No direct script access allowed'); }

/**
 * Forms
 */
class Forms {
	public static function start($action = '', $max_file_size = 100000) {
		$result = '<form';
		if (!empty($action)) {
			$result .= ' action="' . $action . '"';
		}
		$result .= ' method="post" enctype="multipart/form-data">' . PHP_EOL;
		$result .= '<input type="hidden" name="MAX_FILE_SIZE" value="' . $max_file_size . '" />' . PHP_EOL;
		
		echo $result;

	}

	public static function end() {
		echo '</form>' . PHP_EOL;
	}

	public static function file() {
		echo '<input name="uploadedfile[]" type="file" multiple="multiple" />' . PHP_EOL;
	}
	
	public static function submit() {
		echo '<input type="submit" value="Upload File" />' . PHP_EOL;
	}
}
